package com.authine.cloudpivot.ext.enums;

import lombok.Getter;

import java.util.Objects;

@Getter
public enum ServiceEnumType {

    /**
     * 运营看板
     */

    INQUIRY(1,"询价"),
    QUOTATION(2,"报价"),
    DINGBIAO(3,"定标"),
    ORDERMONEY(4,"订单金额"),
    ORDERNUMBER(5,"订单数量"),
    ORDERGOODNUMBER(6,"订单商品数量"),
    ORDERGOODRETURN(7,"订单退款金额");


    public String des;
    public Integer id;

    ServiceEnumType(Integer id, String des) {
        this.des = des;
        this.id = id;
    }



    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public static ServiceEnumType findDesById(Integer id) {
        if (Objects.isNull(id)) {
            return null;
        }
        for (ServiceEnumType ServiceType : ServiceEnumType.values()) {
            if (Objects.equals(ServiceType.getId(), id)) {
                return ServiceType;
            }
        }
        return null;
    }
}
